package com.ttw.demo;

import android.annotation.SuppressLint;
import android.app.Application;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

import com.ttw.TTW;
import com.ttw.ttw.R;


public class DialogActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Window window = getWindow();
        window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
        setContentView(R.layout.activity_dialog);
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    @SuppressLint("WrongConstant")
    public static void startActivity(Application application) {
        Intent intent = new Intent(application, DialogActivity.class);
        TTW.startActivity(application, intent);
    }

    public void onClick(View view) {
        Toast.makeText(this, "TTW1", Toast.LENGTH_SHORT).show();
        finish();
    }
}